import http from "@/util/http";

/**
 * 获取加密字符串，并对结果进行缓存
 */
export function getEncryptedString() {
  return http({
    url: "/login/getEncryptedString",
    method: "GET",
  });
}

/**
 * 登录接口
 */
export function login(parameter) {
  // console.log("params", parameter);
  return http({
    url: "/login/handleLogin",
    method: "post",
    data: parameter,
    headers: {
      "Content-Type": "application/json;charset=UTF-8",
    },
  });
}

/**
 * 退出接口
 */
export function logout() {
  return http({
    url: "/login/handleLogout",
    method: "post",
  });
}

/**
 * 获取菜单列表
 */
export function getMenuList() {
  return http({
    url: "/login/getMenuList",
    method: "post",
  });
}
